use crate::handler::user::{current_user, login, logout};
use anyhow::Result;
use axum::Router;
use axum::routing::{get, post};

pub fn init_user_router() -> Result<Router> {
    let router = Router::new()
        //        .route("/logout", post(handler_logout))
        //        .route("/register", post(handler_register))
        //        .route("/user", get(handler_user))
        //        .route("/user/:id", get(handler_user_by_id))
        //        .route("/user/:id", put(handler_update_user))
        //        .route("/user/:id", delete(handler_delete_user))
        .route("/login/outLogin", post(logout))
        .route("/currentUser", get(current_user))
        .route("/login", post(login));

    Ok(router)
}
